from xmlrpc.client import boolean
Absent = 0
Late = 0
Present = 0
s = 'PPALLP'
award = True

for char in s:
    print(char)
    if char == "P":
        Present += 1
        Late = 0  # 重置 Late 计数器
    elif char == "L":
        Late += 1
        if Late >= 3:
            award = False
    else:
        Absent += 1
        if Absent >=3:
            award = False
        Late = 0  # 重置 Late 计数器

print(award)
